function createRequest(method, params){
			// summary:
			//	create a JSON-RPC envelope for the request
			//	method: string
			//		The name of the method we are creating the requst for
			//	params: array
			//		The array of parameters for this request;
			
			var req = { "params": params, "method": method };
			var data = $.toJSON(req);
			return data;
}

function callRpcMethod(method,params,callback){
	
	var data = createRequest(method,params);
	$.ajax({ 
	      type:"POST", 
	      url:rpcUrl,
	      dataType:"json",     
	      data: data,         
	      success: callback
	    }); 
	
}